<?php

namespace common\models\kingdee;

use Yii;

/**
 * This is the model class for table "T_ORG_POSITION".
 *
 * @property string $FID
 * @property string $FNAME_L1
 * @property string $FNAME_L2
 * @property string $FNAME_L3
 * @property string $FNUMBER
 * @property integer $FINDEX
 * @property string $FADMINORGUNITID
 * @property string $FJOBID
 * @property string $FEFFECTDATE
 * @property string $FVALIDATE
 * @property string $FDESCRIPTION_L1
 * @property string $FDESCRIPTION_L2
 * @property string $FDESCRIPTION_L3
 * @property string $FSIMPLENAME
 * @property string $FCREATORID
 * @property string $FCREATETIME
 * @property string $FLASTUPDATEUSERID
 * @property string $FLASTUPDATETIME
 * @property string $FHRORGUNITID
 * @property string $FCONTROLUNITID
 * @property string $FPOSITIONTYPEID
 * @property integer $FDELETEDSTATUS
 * @property string $FPUBPROPERLDAP
 * @property integer $FISRESPPOSITION
 * @property integer $FFLUCHECKTIME
 * @property string $FZDY1
 * @property string $FZDY2
 * @property string $FZDY3
 * @property string $FZDY4
 * @property string $FZDY5
 * @property string $FZDY6
 * @property integer $FZDY7
 * @property integer $FZDY8
 * @property integer $FZDY9
 * @property string $FZDY10
 * @property string $FZDY11
 * @property string $FZDY12
 * @property string $FZDY13
 * @property string $FZDY14
 * @property string $FZDY15
 * @property integer $FSORTCODE
 * @property integer $FISCREATEBYJOB
 * @property string $FJOBLEVELID
 * @property integer $FPOSITIONPLANCOUNT
 * @property string $FHISTORYRELATEID
 * @property string $FDOMAINID
 * @property string $FEFFDT
 * @property string $FLEFFDT
 * @property string $FPURPOSE
 * @property string $FLOWJOBGRADEID
 * @property string $FHIGHJOBGRADEID
 * @property string $FPARENTID
 * @property string $FPRODUCTLINEID
 * @property string $FPOSPLANCOUNT
 */
class OrgPosition extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'T_ORG_POSITION';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('db_hr');
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['FID', 'FNUMBER', 'FADMINORGUNITID'], 'required'],
            [['FINDEX', 'FDELETEDSTATUS', 'FISRESPPOSITION', 'FFLUCHECKTIME', 'FZDY7', 'FZDY8', 'FZDY9', 'FSORTCODE', 'FISCREATEBYJOB', 'FPOSITIONPLANCOUNT'], 'integer'],
            [['FEFFECTDATE', 'FVALIDATE', 'FCREATETIME', 'FLASTUPDATETIME', 'FZDY4', 'FZDY5', 'FZDY6', 'FEFFDT', 'FLEFFDT'], 'safe'],
            [['FZDY10'], 'number'],
            [['FID', 'FADMINORGUNITID', 'FJOBID', 'FCREATORID', 'FLASTUPDATEUSERID', 'FHRORGUNITID', 'FCONTROLUNITID', 'FPOSITIONTYPEID', 'FPUBPROPERLDAP', 'FZDY1', 'FZDY2', 'FZDY3', 'FJOBLEVELID', 'FHISTORYRELATEID', 'FDOMAINID', 'FPURPOSE', 'FLOWJOBGRADEID', 'FHIGHJOBGRADEID', 'FPARENTID', 'FPRODUCTLINEID', 'FPOSPLANCOUNT'], 'string', 'max' => 44],
            [['FNAME_L1', 'FNAME_L2', 'FNAME_L3', 'FNUMBER', 'FSIMPLENAME', 'FZDY11', 'FZDY12', 'FZDY13', 'FZDY14', 'FZDY15'], 'string', 'max' => 240],
            [['FDESCRIPTION_L1', 'FDESCRIPTION_L2', 'FDESCRIPTION_L3'], 'string', 'max' => 765],
            [['FID', 'FID', 'FID', 'FID'], 'unique', 'targetAttribute' => ['FID', 'FID', 'FID', 'FID'], 'message' => 'The combination of  and Fid has already been taken.'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'FID' => Yii::t('kingdee', 'Fid'),
            'FNAME_L1' => Yii::t('kingdee', 'Fname  L1'),
            'FNAME_L2' => Yii::t('kingdee', 'Fname  L2'),
            'FNAME_L3' => Yii::t('kingdee', 'Fname  L3'),
            'FNUMBER' => Yii::t('kingdee', 'Fnumber'),
            'FINDEX' => Yii::t('kingdee', 'Findex'),
            'FADMINORGUNITID' => Yii::t('kingdee', 'Fadminorgunitid'),
            'FJOBID' => Yii::t('kingdee', 'Fjobid'),
            'FEFFECTDATE' => Yii::t('kingdee', 'Feffectdate'),
            'FVALIDATE' => Yii::t('kingdee', 'Fvalidate'),
            'FDESCRIPTION_L1' => Yii::t('kingdee', 'Fdescription  L1'),
            'FDESCRIPTION_L2' => Yii::t('kingdee', 'Fdescription  L2'),
            'FDESCRIPTION_L3' => Yii::t('kingdee', 'Fdescription  L3'),
            'FSIMPLENAME' => Yii::t('kingdee', 'Fsimplename'),
            'FCREATORID' => Yii::t('kingdee', 'Fcreatorid'),
            'FCREATETIME' => Yii::t('kingdee', 'Fcreatetime'),
            'FLASTUPDATEUSERID' => Yii::t('kingdee', 'Flastupdateuserid'),
            'FLASTUPDATETIME' => Yii::t('kingdee', 'Flastupdatetime'),
            'FHRORGUNITID' => Yii::t('kingdee', 'Fhrorgunitid'),
            'FCONTROLUNITID' => Yii::t('kingdee', 'Fcontrolunitid'),
            'FPOSITIONTYPEID' => Yii::t('kingdee', 'Fpositiontypeid'),
            'FDELETEDSTATUS' => Yii::t('kingdee', 'Fdeletedstatus'),
            'FPUBPROPERLDAP' => Yii::t('kingdee', 'Fpubproperldap'),
            'FISRESPPOSITION' => Yii::t('kingdee', 'Fisrespposition'),
            'FFLUCHECKTIME' => Yii::t('kingdee', 'Ffluchecktime'),
            'FZDY1' => Yii::t('kingdee', 'Fzdy1'),
            'FZDY2' => Yii::t('kingdee', 'Fzdy2'),
            'FZDY3' => Yii::t('kingdee', 'Fzdy3'),
            'FZDY4' => Yii::t('kingdee', 'Fzdy4'),
            'FZDY5' => Yii::t('kingdee', 'Fzdy5'),
            'FZDY6' => Yii::t('kingdee', 'Fzdy6'),
            'FZDY7' => Yii::t('kingdee', 'Fzdy7'),
            'FZDY8' => Yii::t('kingdee', 'Fzdy8'),
            'FZDY9' => Yii::t('kingdee', 'Fzdy9'),
            'FZDY10' => Yii::t('kingdee', 'Fzdy10'),
            'FZDY11' => Yii::t('kingdee', 'Fzdy11'),
            'FZDY12' => Yii::t('kingdee', 'Fzdy12'),
            'FZDY13' => Yii::t('kingdee', 'Fzdy13'),
            'FZDY14' => Yii::t('kingdee', 'Fzdy14'),
            'FZDY15' => Yii::t('kingdee', 'Fzdy15'),
            'FSORTCODE' => Yii::t('kingdee', 'Fsortcode'),
            'FISCREATEBYJOB' => Yii::t('kingdee', 'Fiscreatebyjob'),
            'FJOBLEVELID' => Yii::t('kingdee', 'Fjoblevelid'),
            'FPOSITIONPLANCOUNT' => Yii::t('kingdee', 'Fpositionplancount'),
            'FHISTORYRELATEID' => Yii::t('kingdee', 'Fhistoryrelateid'),
            'FDOMAINID' => Yii::t('kingdee', 'Fdomainid'),
            'FEFFDT' => Yii::t('kingdee', 'Feffdt'),
            'FLEFFDT' => Yii::t('kingdee', 'Fleffdt'),
            'FPURPOSE' => Yii::t('kingdee', 'Fpurpose'),
            'FLOWJOBGRADEID' => Yii::t('kingdee', 'Flowjobgradeid'),
            'FHIGHJOBGRADEID' => Yii::t('kingdee', 'Fhighjobgradeid'),
            'FPARENTID' => Yii::t('kingdee', 'Fparentid'),
            'FPRODUCTLINEID' => Yii::t('kingdee', 'Fproductlineid'),
            'FPOSPLANCOUNT' => Yii::t('kingdee', 'Fposplancount'),
        ];
    }
}
